#ifndef _HKX2DAE_H_
#define _HKX2DAE_H_

// Collada
#include <dae.h>
#include <dom/domCOLLADA.h>
#include <dom/domProfile_COMMON.h>

// Havok
#include <Common/Base/hkBase.h>
#include <Common/Base/Reflection/hkClass.h>
#include <Common/SceneData/Material/hkxMaterial.h>
#include <Common/SceneData/Material/hkxTextureFile.h>
#include <Common/SceneData/Material/hkxTextureInplace.h>
#include <Common/SceneData/Mesh/hkxMesh.h>
#include <Common/SceneData/Mesh/hkxMeshSection.h>
#include <Common/SceneData/Mesh/hkxVertexBuffer.h>
#include <Common/SceneData/Mesh/hkxIndexBuffer.h>
#include <Common/SceneData/Scene/hkxScene.h>
#include <Common/SceneData/Selection/hkxNodeSelectionSet.h>
#include <Animation/Animation/hkaAnimationContainer.h>
#include <Animation/Animation/Rig/hkaSkeleton.h>

// Std
#include <string>
using std::string;

// Custom
#include <tools.cpp>

class hkx2dae
{
public:
	hkx2dae(string);
	void save();
	// Tier 1.
	domAsset				*addAsset(hkxScene *);
	domLibrary_animations	*addLibraryAnimations(hkxScene *);
	domLibrary_images		*addLibraryImages(hkxScene *);
	domLibrary_geometries	*addLibraryGeometries(hkxScene *);
	domLibrary_controllers	*addLibraryControllers(hkaAnimationContainer *);
	domLibrary_materials	*addLibraryMaterials(hkxScene *);
	// Tier 2.
	//void addAnimation(hkaAnimationContainer *);
	domController			*addController(hkaSkeleton *);
	domEffect				*addEffect(hkxMaterial *, domLibrary_effects *);
	domGeometry				*addGeometry(hkxMeshSection *, domLibrary_geometries *);
	domImage				*addImage(hkxTextureFile *, domLibrary_images *);
	domMaterial				*addMaterial(hkxMaterial *, domLibrary_materials *);
	//void addScene(hkxScene *);
	// Tier 3.
	domSource				*addSource(domMesh *, hkxVertexBuffer *, hkxVertexDescription::DataUsage);
	domVertices				*addVertices(domMesh *, domSource *);
	domTriangles			*addTriangles(domMesh *, hkxIndexBuffer *);
private:
	DAE dae;
	domCOLLADA *root;
	string file;
};

#endif
